package components
{
	import UIFree.uif_component;
	import UIFree.uif_ecomponent;
	
	import flash.geom.Rectangle;

	public class uif_cross extends uif_ecomponent {
		public function uif_cross(parent:uif_component, ax:int=0, ay:int=0, awidth:int=0, aheight:int=0, styleClass:String='') {
			super(parent, ax, ay, awidth, aheight, styleClass);
		}
		
		override protected function paint(a_styleClass: String): void {
			var rect: Rectangle;
			var style: Object = app.styleByName(a_styleClass);
			if (style.round) {
				rect = getBorder();
				begin2(style.round);
				this.graphics.drawEllipse(rect.x, rect.y, rect.width, rect.height);
			}
			rect = getInner();
			begin2(style);
			this.graphics.moveTo(rect.x, rect.y);
			this.graphics.lineTo(rect.x + rect.width, rect.y + rect.height);
			this.graphics.moveTo(rect.x + rect.width, rect.y);
			this.graphics.lineTo(rect.x, rect.y + rect.height);
		}
	}
}